<template>
	<view class="main">
		<view class="intro">
			<view class="item">
				<text class="title">普通用户推广：</text>
				(成功推广3人，可赠送VIP7天)
				(注：点击下方“立即推广”按钮，好友成功登陆注册，即为有效分享。)
				
			</view>
			<view class="item">
				<text class="title">注:推广赠送会员每人只可享受一次</text>
				
			</view>
			<view class="item">
				<text class="title">----------------(以下为代理推广)---------------</text>
				
			</view>
			<view class="item">
				<text class="title">奖励介绍：</text>
				(1星币=1RMB)
			</view>
			<view class="item">
				<text class="title">区域代理：</text>
				对应区域开通会员30星币/人
			</view>
			<view class="item">
				<text class="title">一级代理：</text>
				下级开通会员30星币/人奖励
			</view>
			<view class="item">
				<text class="title">二级代理：</text>
				下级开通会员20星币/人奖励
			</view>
			<view class="item">
				<text class="title">三级代理：</text>
				下级开通会员10星币/人奖励
			</view>
			<view class="green">如何升级？</view>
			<view class="item">
				三级代理推荐开通会员人数达10人升级为二级代理；达50人升级为一级代理。
			</view>
			<view class="warn">
				注: 升级区域代理需联系官方人员进行申请，对该代理进行资质审核，且是一级代理才能具备申请资格!
			</view>
		</view>
		<button class="submitBtn" open-type="share">立即推广</button>
	</view>
</template>

<script>
	import { mapState, mapMutations, mapGetters } from 'vuex';
	export default {
		computed: {
			...mapState(['userInfo']),
			...mapGetters(['hasLogin'])
		},
		data() {
			return {
				windowHeight:0
			}
		},
		 onLoad() {
			 this.windowHeight=uni.getSystemInfoSync()['windowHeight'];
		// 	uni.getSystemInfo({
		// 		success:function(res){
		// 			console.log(res.windowHeight);
		// 		}
		// 	})
		 },
		 onShareAppMessage(res) { //发送给朋友
		 	let that = this
		 console.log("pcode==",that.userInfo.pcode)
		 		return {
		 			title: "找兼职/找工作，海量岗位放心选",
		 			path: "/pages/index/index?pcode="+that.userInfo.pcode,
		 			imageUrl: "https://cmtq-1317574530.cos.ap-guangzhou.myqcloud.com/banner/%E7%94%BB%E6%9D%BF%203.png",
		 			success(res) {
		 				console.log('success(res)==', res);
		 				uni.showToast({
		 					title: '分享成功'
		 				})
		 			},
		 			fail(res) {
		 				console.log('fail(res)==', res);
		 				uni.showToast({
		 					title: '分享失败',
		 					icon: 'none'
		 				})
		 			}
		 		}
		 	},
		methods: {
			
		}
	}
</script>

<style lang="scss">
.main{
	background-image: url("https://cmtq-1317574530.cos.ap-guangzhou.myqcloud.com/img2023/%E9%87%8D%E5%A4%8D%E7%BD%91%E6%A0%BC%201.png");
	width:100%;
	background-size: contain;
	background-repeat: no-repeat;
	padding: 500rpx 4% 20rpx 4%;
}
.intro{
	border: 1px solid black;
	border-radius: 8upx;
	padding:30upx 7%;
	width:78%;
	background-color: white;
}
.title{
	color:black;
	font-weight: 700;
}
.green{
	color:#5FDB7E;
	font-weight: 700;
}
.item{
	color:#888;
	line-height: 50upx;
	font-size: 28upx;
}
.warn{
	margin-top:20upx;
	color:#D68800;
	font-size: 24upx;
}
.submitBtn{
	margin: 20upx 0 20upx 0;
	width:92%;
	height:80upx;
	line-height: 80upx;
	color:white;
	border-radius: 35upx;
	background-color: #5FDB7E;
}
</style>
